package com.tsd.system.entity;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.tsd.core.utils.HlpUtils;
import io.swagger.annotations.ApiModel;

import java.io.Serializable;

/**
 * 设置（json）扩展
 *
 * @author david
 * @date 2021/07/15 10:35:26
 */
@ApiModel(description = "设置（json）扩展")
public class SysSettingExt extends SysSetting implements Serializable {

    public static final String SYS_SETTING_TABLE_NAME = "sys_setting";

    public SysSettingExt() {
    }

    public SysSettingExt(String code) {
        this.setCode(code);
    }

    private String account_set_sid;

    public String getAccount_set_sid() {
        return account_set_sid;
    }

    public void setAccount_set_sid(String account_set_sid) {
        this.account_set_sid = account_set_sid;
    }

    public JSONObject getJson_object() {
        if (!HlpUtils.isEmpty(this.getJson()) && JSONUtil.isJsonObj(this.getJson())) {
            return JSON.parseObject(this.getJson());
        }
        return null;
    }
}
